package com.foreknow.dao;

import com.foreknow.model.Admin;

import java.sql.SQLException;

public interface AdminDao {
    /**
     * 添加
     * @param admin
     * @return
     */
    public boolean save(Admin admin) throws SQLException;

    /**
     * 根据id删除某个员工
     * @param id
     * @return
     */
    public boolean deleteById(int id)throws SQLException;

    /**
     * 根据id查询某个员工
     * @param id
     * @return
     */
    public Admin getQueryById(int id)throws SQLException;

    /**
     * 修改员工信息
     * @param admin
     * @return
     */
    public boolean update(Admin admin)throws SQLException;

    /**
     * 登录
     * @param name
     * @param pass
     * @return
     */
    public Admin isLogin(String name,String pass)throws SQLException;

    /**
     * 查询所有信息
     * @return
     */
    public Admin[] getQueryAll()throws SQLException;
}
